/* lwIP Configuration Options */

#ifndef __LWIPOPTS_H__
#define __LWIPOPTS_H__

/* ------------------------ Core Options ------------------------ */
#define LWIP_TCP 1
#define LWIP_UDP 1
#define LWIP_ICMP 1
#define LWIP_DHCP 1
#define LWIP_AUTOIP 0
#define LWIP_IGMP 0
#define LWIP_DNS 1

/* ------------------------ Memory Options ------------------------ */
#define MEM_ALIGNMENT 4
#define MEM_SIZE 16384 /* 16KB */
#define MEMP_NUM_PBUF 16
#define MEMP_NUM_UDP_PCB 8
#define MEMP_NUM_TCP_PCB 8
#define MEMP_NUM_TCP_PCB_LISTEN 4
#define MEMP_NUM_TCP_SEG 16
#define MEMP_NUM_REASSDATA 8
#define MEMP_NUM_ARP_QUEUE 8
#define MEMP_NUM_RAW_PCB 4

/* ------------------------ Pbuf Options ------------------------ */
#define PBUF_POOL_SIZE 16
#define PBUF_POOL_BUFSIZE 1520

/* ------------------------ TCP Options ------------------------ */
#define TCP_TTL 255
#define TCP_MSS 1460
#define TCP_SND_BUF 2048
#define TCP_SND_QUEUELEN 8
#define TCP_WND 2048
#define TCP_LISTEN_BACKLOG 8

/* ------------------------ IP Options ------------------------ */
#define IP_DEFAULT_TTL 255
#define IP_FORWARD 0
#define IP_OPTIONS_ALLOWED 1

/* ------------------------ ARP Options ------------------------ */
#define ARP_TABLE_SIZE 10
#define ARP_QUEUEING 1

/* ------------------------ DHCP Options ------------------------ */
#define DHCP_DOES_ARP_CHECK 1
#define DHCP_MAX_NTP_SERVERS 1

/* ------------------------ DNS Options ------------------------ */
#define DNS_TABLE_SIZE 4
#define DNS_MAX_NAME_LENGTH 64

/* ------------------------ FreeRTOS Options ------------------------ */
#define NO_SYS 0
#define SYS_LIGHTWEIGHT_PROT 1
#define LWIP_SOCKET 1
#define LWIP_NETCONN 1

/* ------------------------ Thread Options ------------------------ */
#define TCPIP_THREAD_NAME "tcpip_thread"
#define TCPIP_THREAD_STACKSIZE 1024
#define TCPIP_THREAD_PRIO 4

#define DEFAULT_THREAD_NAME "lwip_thread"
#define DEFAULT_THREAD_STACKSIZE 512
#define DEFAULT_THREAD_PRIO 3

/* ------------------------ Timer Options ------------------------ */
#define LWIP_TIMERS 1
#define LWIP_TIMER_THREAD 1
#define LWIP_TIMER_THREAD_NAME "timer_thread"
#define LWIP_TIMER_THREAD_STACKSIZE 512
#define LWIP_TIMER_THREAD_PRIO 2

/* ------------------------ Debug Options ------------------------ */
#define LWIP_DEBUG 0
#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_OFF

#endif /* __LWIPOPTS_H__ */
